////////////////////////////////////////////////////////////////////////////////
// Filename: L_dx11graphics.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _L_DX11GRAPHICS_H_
#define _L_DX11GRAPHICS_H_

#include <D3DX11.h>
#include "L_math.h"
#include "L_dx11effect.h"
#include "L_dx11vertexbuffer.h"
#include "L_dx11renderer.h"
#include "L_dx11resourcemanager.h"

struct Vertex
{
   Vertex(){}
   Vertex(float x, float y, float z, float u, float v)
      : pos(x,y,z), texCoord(u, v){}

   float3 pos;
   float2 texCoord;
};

class L_DX11Graphics
{
	ID3D11Device* Device;
	ID3D11DeviceContext* DeviceContext;
	IDXGISwapChain* SwapChain;
	ID3D11RenderTargetView* renderTargetView;

	L_DX11VertexBuffer* VB;
	L_DX11Effect* MyEffect;

	L_DX11ResourceManager* ResourceManager;
	L_DX11Renderer* Renderer;

	D3D11_INPUT_ELEMENT_DESC layout[2];
	unsigned int LayoutNumElements;

public:
	L_DX11Graphics();
	~L_DX11Graphics();

	bool Init(HWND Hwnd);
	bool CalculateScene();
	void Render();
};

#endif